﻿using Assets.Script.Data.Player;
using Assets.Script.Human.Player;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Assets.Script.HelpSystem.Reward.Rewards.InCase
{
    class AddAtk_10p : PlayerBuff
    {
        public AddAtk_10p(string name, bool haveUI, string describe, float limitTime_S, BuffType bType) : base(name, haveUI, describe, limitTime_S, bType)
        {
        }

        public override void OnGetFirst(PlayerBody playerBody)
        {
            base.OnGetFirst(playerBody);
            BulletData b = new BulletData();
            b.Atk += new BaseData(0, 0.1f, 0, 0, 0);
            var data = new PlayerData() { BulletData = b };
            playerBody.PlayerData.Plus(data);

            EventManager.Broadcast(EventName.Player.DataChange, playerBody.Id);

            playerBody.BuffManager.RemoveBuff(this);
        }

        public override void OnGetSecond()
        {
            OnGetFirst(playerBody);
        }
    }
}
